﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices.WindowsRuntime;
using MiPWinRTSDK.MiP.Models;
using Windows.Devices.Enumeration;
using Windows.Foundation;
using Windows.UI;

namespace MiPWinRTSDK.Interfaces
{
    public interface IMiPBase
    {
        Color ChestLEDColor { get; }
        byte ChestLEDTimeOff { get; }
        byte ChestLEDTimeOn { get; }
        DeviceInformation Device { get; set; }

        event EventHandler<ChestLED> ChestLEDRecievedEvent;
        event EventHandler<object> ShakeDetectedRecievedEvent;

        void Connect();
        IAsyncAction ContinuousDrive(byte direction, byte spin);
        IAsyncAction DelayTimeBetweenTwoClaps(int delay);
        IAsyncAction DisconnectApp();
        IAsyncAction DistanceDrive(DirectionEnum direction, byte distance, TurnEnum turn, int angle);
        IAsyncAction DriveBackwardWithTime(byte speed, byte timeInMiliseconds);
        IAsyncAction DriveForwardWithTime(byte speed, byte timeInMiliseconds);
        IAsyncAction FlashChestLED(byte red, byte green, byte blue, byte timeOn, byte timeOff);
        IAsyncAction GetHardwareInfo();
        IAsyncAction GetUserOrOtherEepromData(byte address);
        IAsyncAction GetVolume();
        IAsyncAction PlaySound([ReadOnlyArray] MiPSound[] sounds, byte numberOfTimesToRepeat);
        IAsyncAction RequestChestLED();
        IAsyncAction RequestHeadLED();
        IAsyncAction RequestStatus();
        IAsyncAction SetChestLED(byte red, byte green, byte blue);
        IAsyncAction SetHeadLED(LightEnum light1, LightEnum light2, LightEnum light3, LightEnum light4);
        IAsyncAction SetUserData(byte address, byte data);
        IAsyncAction Sleep();
        IAsyncAction Stop();
        byte[] StringToByteArray(string hex);
        IAsyncAction TurnLeftByAngle(byte speed, int angle);
        IAsyncAction TurnRightByAngle(byte speed, int angle);
    }
}